package Chapter6.indexs;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;

import org.hibernate.annotations.Index;
import org.hibernate.annotations.Table;

@Entity
@Table(appliesTo = "BookIndexs", indexes = {
		@Index(name = "NAME_INDEX", columnNames = { "name" }),
		@Index(name = "ADDRESS_INDEX", columnNames = { "address" }) })
public class BookIndexs implements Serializable {
	private static final long serialVersionUID = 1L;
	private Long id;
	private String name;
	private String address;

	public BookIndexs() {
	}

	public BookIndexs(String name, String address) {
		this.name = name;
		this.address = address;
	}

	@Id
	@GeneratedValue
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

}
